package option

import (
	"os"
	"path/filepath"

	"github.com/mitchellh/go-homedir"
)

const (
	DEFAULT_CONFIG_PATH     = `~/.gluenet/monitor`
	DEFAULT_NAMESPACE       = `monitoring`
	ENV_GLUENET_CONFIG_ROOT = "GLUENET_CONFIG_ROOT"
)

type MonitorOptions struct {
	DryRun     bool
	Guid       string
	Nats       string
	ConfigRoot string
	Namespace  string
	Components []string
}

func GenMointorConfigPath(platform string) string {
	configRoot := os.Getenv(ENV_GLUENET_CONFIG_ROOT)
	if configRoot == `` {
		configRoot, _ = homedir.Expand(filepath.Join(DEFAULT_CONFIG_PATH, platform))
	}

	return configRoot
}
